<include file="Core:Public:header" />
<link rel="stylesheet" href="__PUBLIC__/css/treeview/jquery.treeview.css" type="text/css">
<script type="text/javascript" src="__PUBLIC__/js/treeview/jquery.treeview.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/treeview/jquery.treeview.edit.js"></script>
<script src="__PUBLIC__/js/datepicker/WdatePicker.js"></script>
<script type="text/javascript">
	$(function() {
		$("#browser").treeview();
	})
</script>
<style type="text/css">
.ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position:-144px 0; vertical-align:top; *vertical-align:middle}
.dltable{width:100%;height:600px;}
.dllist{width:400px;height:500px;float:left;border:1px solid #717171;background-color:#E8E8E8;}
.dt1{float:left;width:100%;border-bottom:1px solid #afafaf;text-align:center;font-size:15px;line-height:50px;background-color:#c4c4c4;}
.dd1{float:left;width:100%;height:60px;padding-top:10px;padding-left:10px;border-bottom:1px solid #afafaf;line-height:30px;}
.tsubmit{
width:70px;height:30px;background-color:#0789cc;border:hidden;
-moz-box-shadow: 2px 2px 1px #909090;
-webkit-box-shadow: 2px 2px 1px #909090;
box-shadow:2px 2px 1px #909090;
border-radius:10px;
font-family:黑体;
font-size:15px;
color:white;
text-align:center;
}
.tsubmit:hover{
	background-color:#055680;
}
.turnul{
	list-style:none;
	width:800px;
	background-color:#B9D3EE;
}
.turnul li{
	line-height:60px;
}

</style>
{:W('Navigation')}
<div class="body-right">
	<div class="row-table">
		<div class="row-table-title">添加营业额</div>
	</div>
	
<form action="{:U('chrm/turnover/turnover_add2')}" onsubmit="return validate_form(this)" method="post">
<?php $bai=100/count($types);?>
								
	<ul class="turnul">
		
				    	<li>团&nbsp;&nbsp;&nbsp;队：
				    		<select name="dep" class="form-control">

				    			<option value="">请选择团队</option>
								<option value="{$dep.super.department_id}">{$dep.super.name}</option>
				    			<volist name="dep['p']" id="vo">
				    				<option value="{$vo.parent.department_id}">{$vo.parent.name}</option>
				    				<foreach name="vo['child']" item="v">
				    					<option value="{$v.department_id}">------------{$v.name}</option>
				    				</foreach>
				    			</volist>

				    		</select>
				    	</li>

				    		
				    	<li>
				    	日&nbsp;&nbsp;&nbsp;期：
				    	<input type="text" name="tdate" class="form-control" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:00'})" value="{$tdate|date="Y-m-d",###}" style="width:200px;"/>
				    		
				    	</li>
				    	
						<li>营业额：<input type="text" name="money" value="" style="line-height:30px;"/></li>
					
	
						<li>
							备&nbsp;&nbsp;&nbsp;注：
								<textarea name="desc" cols="100" style="line-height:30px;"></textarea>
						</li>
						<li style="text-align:center;margin-top:50px;">
							<input type="submit" value="提交"  class="btn btn-primary" />
						</li>
	</ul>
	
</form>		
	
	
	
</div>
<div class="clear"></div>
<script type="text/javascript">
function validate_name(dep,str){
	with(dep)
	{
		if(value==null || value=="")
		{alert(str);return false;}
		else{	return true;}
	}
}

	function validate_form(thisform){
		with(thisform)
		{
			if(validate_name(dep,"请选择团队")==false){
				dep.focus();return false;
			}
			if(validate_name(expend_date,"请输入支出日期")==false){
				expend_date.focus();return false;
			}

		}
	}
</script>

<include file="Core:Public:alert" />
<include file="Core:Public:footer" />